Skip to content

Improve elemwise docstrings #1255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 28, 2025
Merged

Conversation

fonnesbeck
Copy link
Member

@fonnesbeck fonnesbeck commented Feb 28, 2025

Description

Improve elemwise math function docstrings; remove generic docstring from being appended.

Related Issue

Checklist

Type of change

  • New feature / enhancement
  • Bug fix
  • Documentation
  • Maintenance
  • Other (please specify):

📚 Documentation preview 📚: https://pytensor--1255.org.readthedocs.build/en/1255/

Copy link

codecov bot commented Feb 28, 2025

Codecov Report

Attention: Patch coverage is 92.20779% with 6 lines in your changes missing coverage. Please review.

Project coverage is 81.99%. Comparing base (69efc68) to head (865809c).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pytensor/tensor/math.py 92.10% 4 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1255   +/-   ##
=======================================
  Coverage   81.99%   81.99%           
=======================================
  Files         188      188           
  Lines       48551    48553    +2     
  Branches     8673     8673           
=======================================
+ Hits        39810    39812    +2     
  Misses       6579     6579           
  Partials     2162     2162           
Files with missing lines Coverage Δ
pytensor/tensor/elemwise.py 89.59% <100.00%> (ø)
pytensor/tensor/math.py 92.01% <92.10%> (ø)

... and 3 files with indirect coverage changes

@ricardoV94 ricardoV94 changed the title Elemwise docstrings Improve elemwise docstrings Feb 28, 2025
@ricardoV94
Copy link
Member

@fonnesbeck looks good, we need to check what the rendered docs look like. Does help() or whatever your IDE use also show the new docstrings nicely?

@fonnesbeck
Copy link
Member Author

fonnesbeck commented Feb 28, 2025

Here is help(pt.math.exp)
image

@ricardoV94
Copy link
Member

Docs must use some hardcoded stuff: https://pytensor--1255.org.readthedocs.build/en/1255/library/tensor/basic.html#pytensor.tensor.exp

But this is already a nice improvement

@ricardoV94 ricardoV94 merged commit 2a7f3e1 into pymc-devs:main Feb 28, 2025
72 of 73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Docstrings for Elemwise Ops are not very helpful
2 participants